home *** CD-ROM | disk | FTP | other *** search
- Adam -
-
- Applications that use c-client have the problem solved for them.
-
- What they do is instead of remembering the message number, they remember
- the message cache element from mail_elt(). For each time you remember the elt
- (e.g. by storing it on a window's property list), you increment its lock count
- (elt->lockcount). When you are finished with a remembered elt, you call
- mail_free_elt(), which decrements the lock count and frees the elt only if the
- lock count reaches 0.
-
- The message number can then be accessed by elt->msgno. It is kept
- current in spite of expunges. If elt->msgno is 0, that means that that
- particular message has been expunged and is now an orphan.
-
- This is precisely why the message number is in the elt, and why elts have
- a lock count.
-
- Your workaround of deferring expunge until close is not guaranteed to
- work, because it is perfectly possible that messages will get expunged without
- you issuing an expunge yourself. This doesn't happen much yet, but forewarned
- is forearmed.........
-
- Unique ID's are going to be added to IMAP to support disconnected use,
- but they aren't there yet.
-
- -- Mark --
-
-
-
-